package com.suxin.service_world.controller;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WorldController {


    private Logger logger = LoggerFactory.getLogger(WorldController.class);


    @Value("${server.port}")
    private String port;

    @GetMapping(value = "world")
    public String world(@RequestParam(value = "name",defaultValue = "world_suxin") String name) {

        logger.info("service_world 被调用，参数name:{}", name);

        return "world "+name +", i am service_world i am from "+ port;

    }
}
